import { getUrl } from '../utils/index';
import { ZwUnityKitNetwork } from '@zhongwan/zw-unitykit-network';

/**
 * @description: 获取标签组类别列表（客户标签）
 * @return {*}
 */
export const getCustTagsTypes = app => {
    const url = getUrl(app, '/scrm-api/console/customer/tag/list-group-type');
    const method = 'get';
    return ZwUnityKitNetwork({ url, method });
};

/**
 * @description: 获取标签组类别列表（客户群标签）
 * @return {*}
 */
export const getCustGroupTagsTypes = app => {
    const url = getUrl(app, '/scrm-api/console/customer/groupchat-tag/list-group-type');
    const method = 'post';
    return ZwUnityKitNetwork({ url, method });
};

/**
 * @description: 获取标签组内的数据（客户标签）
 * @param {*} params
 * @return {*}
 */
export const getCustTagsList = (app, params) => {
    const url = getUrl(app, '/scrm-api/console/customer/tag/list-tag');
    const method = 'get';
    return ZwUnityKitNetwork({ url, method, params });
};

/**
 * @description: 获取标签组内的数据（客户群标签）
 * @param {*} data
 * @return {*}
 */
export const getCustGroupTagsList = (app, data) => {
    const url = getUrl(app, '/scrm-api/console/customer/groupchat-tag/list-tag');
    const method = 'post';
    return ZwUnityKitNetwork({ url, method, data });
};

/**
 * @description: 搜索获取标签数据（客户标签）
 * @param {*} params
 * @return {*}
 */
export const queryCustTagsList = (app, params) => {
    const url = getUrl(app, '/scrm-api/console/customer/tag/list-tag-new');
    const method = 'get';
    return ZwUnityKitNetwork({ url, method, params });
};

/**
 * @description: 搜索获取标签数据（客户群标签）
 * @param {*} params
 * @return {*}
 */
export const queryCustGroupTagsList = (app, params) => {
    const url = getUrl(app, '/scrm-api/console/customer/groupchat-tag/list-tag-new');
    const method = 'get';
    return ZwUnityKitNetwork({ url, method, params });
};
